package com.example.administrator.netchess;


public class Common {
    //请求命令
    public static final class JsonCmdReq {
        public static final int CREATE_ROOM = 0;
        public static final int APPLY_FOR_ROOM_LIST = CREATE_ROOM+1;
        public static final int APPLY_FOR_JOIN_ROOM= APPLY_FOR_ROOM_LIST+1;
        public static final int APPLY_FOR_EXIT_ROOM= APPLY_FOR_JOIN_ROOM+1;
        public static final int READY= APPLY_FOR_EXIT_ROOM+1;
        public static final int SEND_CHESS= READY+1;
        public static final int RECEIVE_CHESS= SEND_CHESS+1;
        public static final int LENGTH= RECEIVE_CHESS+1;
    }

    //回复命令
    public static final class JsonCmdResp {
        public static final int CREATE_ROOM = 100;
        public static final int APPLY_FOR_ROOM_LIST = CREATE_ROOM+1;
        public static final int APPLY_FOR_JOIN_ROOM= APPLY_FOR_ROOM_LIST+1;
        public static final int START_GAME= APPLY_FOR_JOIN_ROOM+1;
        public static final int LENGTH= START_GAME+1;
    }

    //键值名
    public static final class FinalString {
        public static final String CMD = "cmd";
        public static final String MY_NAME = "Invoker";
        public static final String KEY_NAME = "name";
        public static final String KEY_STATUS = "status";
        public static final String KEY_ROOM_INFO = "room_info";
        public static final String KEY_ROOM_ID = "room_id";
        public static final String KEY_ROOM_NAME = "room_name";
        public static final int MESSAGE_MAIN = 1;
        public static final String KEY_ROOM_LIST = "room_list";
        public static final String PLAYER_NUMBER = "player_number";
        public static final int MESSAGE_MAIN_LIST = 2;
        public static final int MESSAGE_JOIN_ROOM = 3;
        public static final int MESSAGE_EMPTY = 4;
        public static final int MESSAGE_INTENT_ROOM = 5;
        public static final int MESSAGE_ROOM_ACTIVITY = 6;
        public static final String IS_READY = "is_ready";
        public static final String IS_OPPONENT_READY = "is_opponent_ready";
        public static final int MESSAGE_READY = 7;
        public static final int MESSAGE_START_GAME = 8;
        public static final String IS_WHITE_CHESS = "is_white_chess";

    }

}
